<?php
/**
 * Created by PhpStorm.
 * User: zing
 * Date: 2018/10/11
 * Time: 22:26
 */

function func()
{
    for ($i = 0; $i < func_num_args(); $i++) {
        //Return an item from the argument list
        echo func_get_arg($i) . PHP_EOL;
    }
    echo '------------------------------' . PHP_EOL;
}

func();
func(1);
func(1, 2);
func(1, 2, 3);
func(get_current_user());